<!--个人空间-->
<div class="card border-0 rounded-0 px-3 mb-2 mb-md-3" id="home-card">
    <div class="card-header bg-white px-0">
        <strong><i class="fa fa-paper-plane mr-2 f-17"></i>公众号</strong>
        <img class="float-right" id="theme-img"
             src="{{ url_for('main.static',filename='img/toggle-dark.png') if request.cookies.get('toggleTheme') == 'dark' else url_for('main.static',filename='img/toggle-light.png') }}"
             alt="theme-toggle" title="切换主题">
    </div>
    <div class="card-body px-0 pt-3 pb-1">
        <div class="row text-center">
            <img class="rounded" style="width: 90%; height: 90%;" src="{{url_for('.static',filename='img/qrcode_for_hesanbiji.jpg')}}">
        </div>
    </div>
</div>
<!--文章分类-->
<div class="card border-0 rounded-0 px-3 mb-2 mb-md-3" id="category-card">
    <div class="card-header bg-white px-0">
        <strong><i class="fa fa-book mr-2 f-17"></i>文章分类</strong>
    </div>
    
    <ul class="list-group list-group-flush f-16">
        {% for c in g.categorys %}
        <li class="list-group-item d-flex justify-content-between align-items-center pr-2 py-2">
            <a class="category-item" href="{{url_for('main.category',c=c.name)}}"
               title="查看【{{c.title}}】分类下所有文章">{{c.title}}</a>
            <span class="badge text-center">{{c.articles.count()}}</span>
        </li>
        {% endfor %}
        
    </ul>
</div>
<!--标签云-->
<div class="card border-0 rounded-0 px-3 mb-2 mb-md-3" id="tag-card">
    <div class="card-header bg-white px-0">
        <strong><i class="fa fa-tags mr-2 f-17"></i>标&nbsp;签&nbsp;云</strong>
    </div>
    <div class="card-body px-0 py-3">
        <div class="tag-cloud"> 
         {% for t in g.tags %}
         <a href="/tag/{{t.name}}/" class="tags f-16" id="tag-{{t.id}}"
            title="{{t.name}}">{{t.name}}</a>
         {% endfor %}
        </div>
    </div>
</div>
<!--最新文章-->
<div class="card border-0 rounded-0 px-3 mb-2 mb-md-3" id="tag-card">
    <div class="card-header bg-white px-0">
        <strong><i class="fa fa-book mr-2 f-17"></i>最新文章</strong>
    </div>
    <ul class="list-group list-group-flush f-16">
        {% for a in g.recent_articles %}
        <li class="list-group-item d-flex justify-content-between align-items-center pr-2 py-2">
            <a class="category-item" href="{{url_for('main.article',name=a.name)}}"
               title="{{a.title}}">{{a.title | truncate(28,killwords=True,leeway=0) }}</a>
            <span class="badge text-center"></span>
        </li>
        {% endfor %}
        
    </ul>
</div>